import pypdf

input_pdf = 'info/IAC2024_FP_2_PLENARIES and GNF_FINAL.pdf'
output_pdf = 'extracted_pages.pdf'

reader = pypdf.PdfReader(input_pdf)
writer = pypdf.PdfWriter()
for i in range(8, reader.get_num_pages()-2):
    writer.add_page(reader.get_page(i))
writer.write(output_pdf)
